package kpi.javatraining6.gnatiuk.src.tester;

import java.io.IOException;

import kpi.javatraining6.gnatiuk.src.tester.readers.UserDOMSaver;
import kpi.javatraining6.gnatiuk.src.tester.user.User;
import kpi.javatraining6.gnatiuk.src.tester.user.UserController;

/**
 * Class starts the program
 */
public class Main {
	public static void main(String[] args) throws IOException, ClassNotFoundException {
		Authorizer authorizer = new Authorizer();
        User user = authorizer.generateUser();
		if(user != null){
			UserController userController = authorizer.getUserController();
			userController.run();
            UserDOMSaver.getInstance().saveUserProgress(user);

		}else{
            System.out.println("Questionnaire wasn't started");
		}
	}
}
